# This code is part of the MWP System
# Copyright (c) 2012 Benjamin Lubin (blubin@bu.com) 
# Published under and subject to the GPLv2 license available at http://www.gnu.org/licenses/gpl-2.0.html

'''
Created on Dec 18, 2012
@author: blubin
'''

from frontend.roleApplication import RoleApplication;
from frontend.form import Type;
from unique import UNIQUE;

class CuratorApplication(RoleApplication):
    """ The Physician User Interface """

    def __init__(self):
        super(CuratorApplication, self).__init__("Gallery"+UNIQUE, "Curator");
        self.register_transition_step("Decision", self.review_form_creator, name_fields=["sequence", "PainterName", "Decision"]);
        #self.register_transition_step("Accept", self.is_prescription_needed_form_creator, name_fields=["sequence", "FirstName", "LastName", "Birthday", 'PrescriptionNumber']);
        #self.register_transition_step("Reject", self.write_prescription_form_creator, name_fields=["sequence", "FirstName", "LastName", "Birthday", 'PrescriptionNumber']);

    def review_form_creator(self, stepname, form):
        form.add_task_label(fields=["sequence", "PainterName", "Decision"]);
        form.add_field(Type.BOOLEAN, "Decision");
        #form.add_field(Type.SHORTSTRING, "Diagnosis");

    #def is_prescription_needed_form_creator(self, stepname, form):
     #   form.add_task_label(fields=["FirstName", "LastName", "Birthday"]);
      #  form.add_field(Type.BOOLEAN, "IsPrescriptionNeeded");
    
    #def write_prescription_form_creator(self, stepname, form):
     #   form.add_task_label(fields=["FirstName", "LastName", "Birthday"]);
      #  form.add_field(Type.SHORTSTRING, "DrugName");l
       # form.add_field(Type.SHORTSTRING, "Dose");
        #form.add_field(Type.SHORTSTRING, "Frequency");
        #form.add_field(Type.INTEGER, "Refills");
        #form.add_field(Type.BOOLEAN, "IsGenericAcceptable");

if __name__ == '__main__':
    app = CuratorApplication();
    app.MainLoop();